package java复习202503.C_泛型;

public class Main {
    public static void main(String[] args) {

        Demo<String> s1 = new Demo<>();
        Class<?> hello = s1.getType("hello");
        System.out.println(hello);

//        传入的参数类型必须和传入的类型相同
//        Demo<Integer> i1 = new Demo<>();
//        Class<?> hello1 = i1.getType("hello");
//        System.out.println(hello1);

    }
}
